<template>
  <!-- 一级路由挂载 -->
  <router-view />
  <!-- <h1>1{{ $store.state.user.profile.id }}</h1>
  <div @click="$store.commit('user/updateValue', Math.random() * 100)">
    点击修改vuex里的值
  </div>
  <button @click="req">点击发送请求</button> -->
</template>
<script>
import request from '@/utils/request.js'
export default {
  setup () {
    async function req () {
      const data = await request('/home/new/simple', 'Get', { a: 1, b: 2 })
      console.log(data)
    }
    return { req }
  }
}
</script>
<style lang="less">
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}

#nav {
  padding: 30px;

  a {
    font-weight: bold;
    color: #2c3e50;

    &.router-link-exact-active {
      color: #42b983;
    }
  }
}
</style>
